const mongoose = require('./db')
const cateSchema = mongoose.Schema({
    name: String
})
const cateModel = mongoose.model('cate', cateSchema)
const shopSchema = mongoose.Schema({
    name: String,
    price: Number,
    img: String,
    cate: {
        type: mongoose.Types.ObjectId,
        ref: 'cate'
    }
})
const shopModel = mongoose.model('shop', shopSchema)
module.exports = {
    cateModel,
    shopModel
}
  